type WatcherCallback<V = unknown> = (oldValue: V, newValue: V) => void | Promise<void>;
interface FlashcoreOptions {
    namespace?: string | Array<string>;
}
/**
 * Built-in KV database for long-term storage.
 *
 * ```ts
 * import { Flashcore } from 'robo.js'
 *
 * await Flashcore.set('key', 'value')
 * const value = await Flashcore.get('key')
 * await Flashcore.delete('key')
 * ```
 *
 * Use this to store and retrieve data across sessions. All APIs are asynchronous.
 * Defaults to file-based storage, but can be configured to use other engines using Keyv adapters.
 *
 * [**Learn more:** Flashcore Database](https://robojs.dev/robojs/flashcore)
 */
declare const Flashcore: {
    /**
     * Clears all key-value pairs from the store.
     *
     * @returns {Promise<boolean> | boolean} - Resolves to a boolean indicating whether the operation was successful.
     */
    clear: () => Promise<boolean> | Promise<void> | boolean | void;
    /**
     * Deletes the value associated with a key from the store.
     *
     * @param {string} key - The key associated with the value to delete.
     * @returns {Promise<boolean> | boolean} - Resolves to a boolean indicating whether the operation was successful.
     */
    delete: (key: string, options?: FlashcoreOptions) => Promise<boolean> | boolean;
    /**
     * Gets the value associated with a key.
     *
     * @template V - The type of the value.
     * @param {string} key - The key associated with the value.
     * @returns {Promise<V> | V} - May return a promise you can await or the value directly.
     */
    get: <V>(key: string, options?: FlashcoreOptions & {
        default?: unknown;
    }) => Promise<V> | V;
    /**
     * Checks if a key exists in the store.
     *
     * @param key - The key to check.
     * @param options  - Options for the operation.
     * @returns - A boolean indicating whether the key exists.
     */
    has: (key: string, options?: FlashcoreOptions) => Promise<boolean> | boolean;
    /**
     * Unregisters a callback from a key, so it will no longer be executed when the key's value changes.
     *
     * @param {string} key - The key to stop watching.
     * @param {WatcherCallback} callback - The callback function to remove from the key's watch list.
     * If no callback is provided, all callbacks associated with the key are removed.
     */
    off: (key: string, callback?: WatcherCallback, options?: FlashcoreOptions) => void;
    /**
     * Registers a callback to be executed when a specific key's value changes in the store.
     *
     * @template V - The type of the value.
     * @param {string} key - The key to watch for changes.
     * @param {WatcherCallback} callback - The callback function to execute when the key's value changes.
     * The callback receives the new and old values as arguments.
     */
    on: (key: string, callback: WatcherCallback, options?: FlashcoreOptions) => void;
    /**
     * Sets a key-value pair in the store.
     *
     * @template V - The type of the value.
     * @param {string} key - The key to associate with the value.
     * @param {V} value - The value to set.
     * @returns {Promise<boolean> | boolean} - Resolves to a boolean indicating whether the operation was successful.
     */
    set: <V_1>(key: string, value: V_1, options?: FlashcoreOptions) => Promise<boolean> | boolean;
};
declare function prepareFlashcore(): Promise<void>;

export { Flashcore, prepareFlashcore };
